package cc.ilzy.mall.model.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author ilzy
 * @since 2025-07-06
 */
@Getter
@Setter
@ToString
@TableName("coupon")
@Accessors(chain = true)
@ApiModel(value = "Coupon对象", description = "")
public class Coupon implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("id")
    private Long id;

    /**
     * 版本号
     */
    @Version
    private Long Version;

    /**
     * 优惠卷类型[new_user 注册赠卷, task任务卷, promotion 促销卷]
     */
    @TableField("category")
    @ApiModelProperty("优惠卷类型[new_user 注册赠卷, task任务卷, promotion 促销卷]")
    private String category;

    /**
     * 发布状态, publish 发布, draft草稿, offline下线
     */
    @TableField("publish")
    @ApiModelProperty("发布状态, publish 发布, draft草稿, offline下线")
    private String publish;

    /**
     * 优惠卷图片
     */
    @TableField("coupon_img")
    @ApiModelProperty("优惠卷图片")
    private String couponImg;

    /**
     * 优惠卷标题
     */
    @ApiModelProperty("优惠卷标题")
    @TableField("coupon_title")
    private String couponTitle;

    /**
     * 抵扣金额
     */
    @TableField("price")
    @ApiModelProperty("抵扣金额")
    private BigDecimal price;

    /**
     * 每人限制张数
     */
    @TableField("user_limit")
    @ApiModelProperty("每人限制张数")
    private Short userLimit;

    /**
     * 优惠卷开始有效时间
     */
    @TableField("start_time")
    @ApiModelProperty("优惠卷开始有效时间")
    private LocalDateTime startTime;

    /**
     * 优惠劵失效时间
     */
    @TableField("end_time")
    @ApiModelProperty("优惠劵失效时间")
    private LocalDateTime endTime;

    /**
     * 优惠劵总量
     */
    @ApiModelProperty("优惠劵总量")
    @TableField("publish_count")
    private Integer publishCount;

    /**
     * 优惠劵库存
     */
    @TableField("stock")
    @ApiModelProperty("优惠劵库存")
    private Integer stock;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 满多少才可以使用
     */
    @ApiModelProperty("满多少才可以使用")
    @TableField("condition_price")
    private BigDecimal conditionPrice;
}
